package com.atstudy.abs;

/**
 * @version v1.0
 * @description:
 * @author: admin
 * @date: 2022/12/16 10:26
 * @copyright: 博为峰
 */
public /*abstract*/ class Circle extends Shape {
    public double diameter;

    public Circle() {
    }

    public Circle(double diameter) {
        this.diameter = diameter;
    }

    public double area() {
        return 3.14 * diameter * diameter;
    }

    @Override
    public double perimeter() {
        return 3.14 * diameter * 2;
    }
}
